package com.example.scaffold_demo.http;



import com.example.httplibrary.cache.CacheHeaders;

import com.example.scaffold_demo.bean.BaseBean;
import com.example.scaffold_demo.mvp.di.user.bean.PersonAcgnRankBean;
import com.example.scaffold_demo.mvp.di.user.bean.UserInfoDateBean;
import com.example.scaffold_demo.mvp.di.user.bean.WelfareHomeUserBean;
import com.google.gson.JsonObject;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Author: 李巷阳
 * Date: 2020/6/1
 * Description:
 */
public interface ApiService {

    /**
     * 福利社主页
     *
     * @return
     */
    @GET("/v1/welfare/home")
    Observable<BaseBean<WelfareHomeUserBean>> doWelfareHomeUser();



    /**
     * 福利社主页
     *
     * @return
     */
    @GET("/v2/acgn/people/history")
    Observable<BaseBean<PersonAcgnRankBean>> getAcgnPeopleHistory(@Query("start") String start, @Query("end") String end, @Query("page") int page);


    /**
     * 登陆
     * member/user/login
     */
    @POST("/v3/member/user/login")
    @Headers(CacheHeaders.NORMAL)
    @FormUrlEncoded
    Observable<BaseBean<UserInfoDateBean>>  login(@Field("black_box") String black_box, @Field("phone") String phone, @Field("passwd") String passwd);
    /**
     * 登陆
     * member/user/login
     */
    @POST("/v3/member/user/login")
    @FormUrlEncoded
    Observable<BaseBean<JsonObject>>  logins(@Field("black_box") String black_box, @Field("phone") String phone, @Field("passwd") String passwd);

}
